﻿using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Runtime.Serialization;
using System;

namespace Ausy.Servey.QuestionProvider.Contract
{
    /// <summary>
    /// Cette classe représente une Question
    /// </summary>
    [DataContract]
    public class Question
    {
        #region Identifier Property

        /// <summary>
        /// Identifiant du Questionnaire
        /// </summary>
        [DataMember]
        public Guid Identifier { get; set; }

        #endregion        

        #region Text Property
        /// <summary>
        /// Property text
        /// </summary>
        private string text;

        /// <summary>
        /// Property Text
        /// </summary>
        [DataMember]
        public string Text
        {
            get { return this.text; }
            set { this.text = value; }
        }
        #endregion

        #region AnswerCollection Property
        /// <summary>
        /// Property answerCollection
        /// </summary>
        private List<Answer> answerCollection;

        /// <summary>
        /// Property AnswerCollection
        /// </summary>
        [DataMember]
        public List<Answer> AnswerCollection
        {
            get { return this.answerCollection; }
            set { this.answerCollection = value; }
        }
        #endregion

        #region Constructors

        /// <summary>
        /// Constructeur par défaut
        /// </summary>
        public Question()
        {
            this.Identifier = Guid.Empty;
            this.text = string.Empty;
            this.answerCollection = new List<Answer>();
        }

        #endregion
    }
}
